import formateDate from '@/utils/formateDate'

export function columns(researchScoreTitle, researchScoreProps, identity) {
  return [{
    name: '学术论文',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '论文题目',
        minWidth: 200,
        dataIndex: 'name',
      },
      {
        title: '归口类型',
        minWidth: 80,
        dataIndex: 'type',
        formatter: (row: any) => {
          return row.type === 1 ? '科技类' : '社科类'
        }
      },
      {
        title: '刊名',
        minWidth: 100,
        dataIndex: 'magName',
      },
      {
        title: 'CN号',
        minWidth: 80,
        dataIndex: 'cnNumber',
      },
      {
        title: 'ISSN号',
        minWidth: 80,
        dataIndex: 'issnNumber',
      },
      {
        title: '期刊',
        minWidth: 80,
        dataIndex: 'mag',
      },
      {
        title: '发表日期',
        minWidth: 100,
        dataIndex: 'businessDate',
        formatter: (row: any) => {
          return formateDate(row.businessDate).format('YYYY.MM.DD')
        }
      },
      {
        title: '论文字数',
        minWidth: 80,
        dataIndex: 'wordCount',
      },
      {
        title: '认定等级',
        minWidth: 80,
        dataIndex: 'recognitionLevelName',
      },
      {
        title: '收录情况',
        minWidth: 80,
        dataIndex: 'inclusionStatusName',
      },
      {
        title: 'WOS号',
        minWidth: 80,
        dataIndex: 'wosNumber',
      },
      {
        title: 'AN号',
        minWidth: 80,
        dataIndex: 'anNumber',
      },
      {
        title: researchScoreTitle,
        minWidth: 80,
        dataIndex: researchScoreProps,
      },
      {
        title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '学术著作',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '著作名称',
        minWidth: 240,
        dataIndex: 'name',
      },
      {
        title: '书号',
        minWidth: 100,
        dataIndex: 'bookNumber',
      },
      {
        title: '著作总字数',
        minWidth: 100,
        dataIndex: 'wordCount',
      },
      {
        title: '出版社名称',
        minWidth: 140,
        dataIndex: 'publisher',
      },
      {
        title: '出版时间',
        minWidth: 100,
        dataIndex: 'businessDate',
        formatter: (row: any) => {
          return formateDate(row.businessDate).format('YYYY.MM.DD')
        }
      },
      {
        title: '认定等级',
        minWidth: 80,
        dataIndex: 'recognitionLevelName',
      },
      {
        title: '著作分类',
        minWidth: 80,
        dataIndex: 'bookTypeName',
      },
      {
        title: '著者类型',
        minWidth: 80,
        dataIndex: 'authorTypeName',
      },
      {
        title: researchScoreTitle,
        minWidth: 80,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '专利/软著',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '专利/软著名称',
        minWidth: 300,
        dataIndex: 'name',
      },
      {
        title: '专利号/登记号',
        minWidth: 100,
        dataIndex: 'patentNumber',
      },
      {
        title: '授权公告日',
        minWidth: 100,
        dataIndex: 'businessDate',
        formatter: (row: any) => {
          return formateDate(row.businessDate).format('YYYY.MM.DD')
        }
      },
      {
        title: '专利/软著类别',
        minWidth: 100,
        dataIndex: 'patentTypeName',
      },
      {
        title: '专利权人',
        minWidth: 140,
        dataIndex: 'patentee',
        formatter: (row: any) => {
          return row.patentee?.map((v: any) => v).join('、')
        }
      },
      {
        title: researchScoreTitle,
        minWidth: 80,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '纵向项目',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '立项/结项',
        minWidth: 60,
        dataIndex: 'conclusionFlag ',
        formatter: (row: any) => {
          return row.conclusionFlag ? '结项' : '立项'
        }
      },
      {
        title: '项目编号',
        minWidth: 80,
        dataIndex: 'projectCode',
      },
      {
        title: '项目名称',
        minWidth: 180,
        dataIndex: 'name',
      },
      {
        title: '署名排序/参研人数',
        minWidth: 80,
        dataIndex: 'signNumber',
      },
      {
        title: '项目类别',
        minWidth: 80,
        dataIndex: 'projectType',
      },
      {
        title: '参研者',
        minWidth: 80,
        dataIndex: 'researchNumber',
      },
      {
        title: '批准单位',
        minWidth: 90,
        dataIndex: 'approvedBy',
      },
      {
        title: '立项时间',
        minWidth: 80,
        dataIndex: 'businessDate',
        formatter: (row: any) => {
          return formateDate(row.businessDate).format('YYYY.MM.DD')
        }
      },
      {
        title: '资助金额(万元)',
        minWidth: 80,
        dataIndex: 'fundingAmount',
      },
      {
        title: '结项时间',
        minWidth: 80,
        dataIndex: 'conclusionTime',
        formatter: (row: any) => {
          return formateDate(row.conclusionTime).format('YYYY.MM.DD')
        }
      },
      {
        title: '鉴定颁发单位',
        minWidth: 90,
        dataIndex: 'issuingUnit',
      },
      {
        title: '认定等级',
        minWidth: 70,
        dataIndex: 'recognitionLevelName',
      },
      {
        title: researchScoreTitle,
        minWidth: 70,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '横向项目管理',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '项目编号',
        minWidth: 100,
        dataIndex: 'projectCode',
      },
      {
        title: '项目名称',
        minWidth: 300,
        dataIndex: 'name',
      },
      {
        title: '合同类别',
        minWidth: 80,
        dataIndex: 'projectType',
      },
      {
        title: '委托单位',
        minWidth: 120,
        dataIndex: 'client',
      },
      {
        title: '经费(万元)',
        minWidth: 100,
        dataIndex: 'funds',
      },
      {
        title: researchScoreTitle,
        minWidth: 80,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '指导学生科研项目结项',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '项目编号',
        minWidth: 100,
        dataIndex: 'projectCode',
      },
      {
        title: '项目名称',
        minWidth: 300,
        dataIndex: 'name',
      },
      {
        title: '项目类别',
        minWidth: 100,
        dataIndex: 'projectType',
      },
      {
        title: '批准单位',
        minWidth: 120,
        dataIndex: 'approvedBy',
      },
      {
        title: '结项时间',
        minWidth: 100,
        dataIndex: 'conclusionTime',
        formatter: (row: any) => {
          return formateDate(row.businessDate).format('YYYY.MM.DD')
        }
      },
      {
        title: '鉴定颁发单位',
        minWidth: 120,
        dataIndex: 'issuingUnit',
      },
      {
        title: '认定等级',
        minWidth: 80,
        dataIndex: 'recognitionLevelName',
      },
      {
        title: researchScoreTitle,
        minWidth: 80,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '重点实验室/科研团队',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '项目名称',
        minWidth: 300,
        dataIndex: 'name',
      },
      {
        title: '批准单位',
        minWidth: 120,
        dataIndex: 'approvedBy',
      },
      {
        title: '认定等级',
        minWidth: 80,
        dataIndex: 'recognitionLevelName',
      },
      {
        title: '立项时间',
        minWidth: 80,
        dataIndex: 'businessDate',
        formatter: (row: any) => {
          return formateDate(row.businessDate).format('YYYY.MM.DD')
        }
      },
      {
        title: '研究状态',
        minWidth: 80,
        dataIndex: 'researchStatus',
        formatter: (row: any) => {
          return row.researchStatus === 1 ? '进行' : '完成'
        }
      },
      {
        title: researchScoreTitle,
        minWidth: 80,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '科研获奖',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '项目名称',
        minWidth: 300,
        dataIndex: 'name',
      },
      {
        title: '类别',
        minWidth: 80,
        dataIndex: 'projectType',
      },
      {
        title: '认定等级',
        minWidth: 80,
        dataIndex: 'recognitionLevelName',
      },
      {
        title: '批准单位',
        minWidth: 140,
        dataIndex: 'approvedBy',
      },
      {
        title: researchScoreTitle,
        minWidth: 80,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '体育竞赛',
    tip: '',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '竞赛名称',
        minWidth: 300,
        dataIndex: 'name',
      },
      {
        title: '认定级别',
        minWidth: 80,
        dataIndex: 'levelName',
      },
      {
        title: '举办时间',
        minWidth: 100,
        dataIndex: 'businessDate',
        formatter: (row: any) => {
          return formateDate(row.businessDate).format('YYYY.MM.DD')
        }
      },
      {
        title: '主办单位',
        minWidth: 140,
        dataIndex: 'organizer',
      },
      {
        title: researchScoreTitle,
        minWidth: 80,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }, {
    name: '其他成果',
    tip: '（教材、其他获奖、艺体类成果、优秀网络文化成果、教学能力奖、教学基本建设、指导大学生创新创业竞赛）',
    columns: [
      {
        title: '序号',
        width: 48,
        dataIndex: 'key',
        formatter: (_row: any, _column: any, _cellValue: any, index: number) => {
          return index + 1
        }
      },
      {
        title: '项目名称',
        minWidth: 300,
        dataIndex: 'name',
      },
      {
        title: '类别',
        minWidth: 100,
        dataIndex: 'otherTypeName',
      },
      {
        title: '批准单位',
        minWidth: 160,
        dataIndex: 'approvedBy',
      },
      {
        title: researchScoreTitle,
        minWidth: 100,
        dataIndex: researchScoreProps,
      },
      {
         title: '操作',
        width: identity ? 80 : 110,
        dataIndex: 'default',
        slotName: 'default',
      }
    ]
  }]
}